<template>
	<div class="order_production">
		<top></top>
		<div class="center">
			<left></left>
			<div class="right" style="overflow:auto">
				<!-- <div class="where">当前位置：分销后台><router-link to="/order_production">生产管理</router-link>
				</div> -->
				<div style="height: 16px; width: 100%; background: #EFEFEF;"></div>

				<div class="doit">
					<div class="doith">批量处理</div>
					<div class="doitd">
						<div>
							<el-button @click="showExportProduct" type="danger" v-if="showExport" style="padding: 8px 20px !important;">导出生产</el-button>
						</div>

						<div>
							<upload-excel-component @on-selected-file="exportData" class="btnp" :buttonName="export_data"></upload-excel-component>
							<el-button @click="downDate" type="text" style="margin-left:10px;">下载导入模板</el-button>
						</div>
						<div>
							<upload-excel-component @on-selected-file="exportData" class="btnp" buttonName="修改导入数据"></upload-excel-component>
							<el-button @click="downDate3" type="text" style="margin-left:10px;">下载导入模板</el-button>
						</div>
						<div>
							<el-button class="btnp" @click="signlog = true" type="danger" style="margin-left:10px; padding: 8px 20px !important;">标记退货</el-button>
						</div>

						<div>
							<upload-excel-component @on-selected-file="exportData" class="btnp" buttonName="导入激活数据"></upload-excel-component>
							<el-button @click="downDate2" type="text" style="margin-left:10px;">下载激活模板</el-button>
						</div>

						<div>
							<upload-excel-component @on-selected-file="exportData" class="btnp" buttonName="刷单订单处理"></upload-excel-component>
							<el-button @click="downshuadan" type="text" style="margin-left:10px;">刷单订单处理模板</el-button>
						</div>
						
						
					</div>
				</div>
				<el-tabs v-model="activeName" type="border-card">
					<el-tab-pane label="订单生产" name="first">
						<div class="ordersearch">
							<el-form ref="form" @submit.native.prevent :model="search" label-width="100px">

								<div class="orderflex" style="margin-left:-23px;">
									<el-form-item label="产品">
										<el-select v-model="productQuery" multiple filterable collapse-tags remote reserve-keyword placeholder="请输入产品名称">
											<el-option v-for="item in productQueryList" :key="item.id" :label="item.name" :value="item.id"></el-option>
										</el-select>
									</el-form-item>

									<el-form-item label="产品编码">
										<el-input v-model="search.good_sku"></el-input>
									</el-form-item>


									<el-form-item label="代理商">
										<el-input v-model="search.merchant_name"></el-input>
									</el-form-item>
									<el-form-item label="订单来源">
										<el-input v-model="search.source"></el-input>
									</el-form-item>

								</div>

								<div class="orderflex" style="margin-left:-23px;">
									<el-form-item label="订单ID">
										<el-input v-model="search.order_id"></el-input>
									</el-form-item>

									<el-form-item label="外部订单编号">
										<el-input v-model="search.source_id"></el-input>
									</el-form-item>

									<el-form-item label="订单状态">
										<el-select clearable v-model="search.status" placeholder="请选择">
											<el-option v-for="item in options1" :key="item.value" :label="item.label" :value="item.value"></el-option>
										</el-select>
									</el-form-item>

									<el-form-item label="按照标旗:">
										<el-select v-model="search.flag" clearable placeholder="标旗">
											<el-option label="灰" value="0">
												<span style="float: left">
													<div class="color1"></div>
												</span><span class="color1s">灰</span>
											</el-option>
											<el-option label="红" value="1">
												<span style="float: left">
													<div class="color2"></div>
												</span><span class="color2s">红</span>
											</el-option>
											<el-option label="黄" value="2">
												<span style="float: left">
													<div class="color3"></div>
												</span><span class="color3s">黄</span>
											</el-option>
											<el-option label="绿" value="3">
												<span style="float: left">
													<div class="color4"></div>
												</span><span class="color4s">绿</span>
											</el-option>
											<el-option label="蓝" value="4">
												<span style="float: left">
													<div class="color5"></div>
												</span><span class="color5s">蓝</span>
											</el-option>
											<el-option label="紫" value="5">
												<span style="float: left">
													<div class="color6"></div>
												</span><span class="color6s">紫</span>
											</el-option>
										</el-select>
									</el-form-item>

								</div>

								<div class="orderflex" style="margin-left:-23px;">
									<el-form-item label="身份证号">
										<el-input v-model="search.card_num"></el-input>
									</el-form-item>

									<el-form-item label="物流单号">
										<el-input v-model="search.tracking_number"></el-input>
									</el-form-item>

									<el-form-item label="生产号码">
										<el-input v-model="search.plan_mobile_produced"></el-input>
									</el-form-item>

									<el-form-item label="iccid">
										<el-input v-model="search.iccid"></el-input>
									</el-form-item>
								</div>
								<div class="orderflex" style="margin-left:-23px;">
									<el-form-item label="手机号">
										<el-input v-model="search.mobile"></el-input>
									</el-form-item>

									<el-form-item label="收货地址">
										<el-input v-model="search.address"></el-input>
									</el-form-item>

									<el-form-item label="是否发货">
										<el-select v-model="search.fahuo" placeholder="是否发货">
											<el-option label="全部" value=""></el-option>
											<el-option label="已发货" value="1"></el-option>
											<el-option label="未发货" value="2"></el-option>
										</el-select>
									</el-form-item>

									<el-form-item label="是否激活">
										<el-select v-model="search.jihuo" placeholder="是否发货">
											<el-option label="全部" value=""></el-option>
											<el-option label="已激活" value="100"></el-option>
											<el-option label="未激活" value="0"></el-option>
										</el-select>
									</el-form-item>
								</div>
								<div class="orderflex timechoose" style="margin-left:-23px;">
									<el-form-item label="时间选择">
										<el-select v-model="timems" @change="timemschange" placeholder="时间选择">
											<el-option label="平台创建时间" value="0">平台创建时间</el-option>
											<el-option label="状态变更时间" value="1">状态变更时间</el-option>
											<el-option label="订单激活时间" value="2">订单激活时间</el-option>
										</el-select>
										<el-date-picker style="width: 470px;" v-model="timemschoose" @change="timechange" value-format="yyyy-MM-dd HH:mm:ss"
										 type="datetimerange" range-separator="——" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
									</el-form-item>
								</div>
								<!-- <div class="orderflex" style="margin-left:-23px;">
                    <el-form-item label="状态变更时间">
                      <el-date-picker v-model="search.time" @change="choosetime" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" range-separator="——" start-placeholder="开始日期" end-placeholder="结束日期" ></el-date-picker>
                    </el-form-item>
                    <el-form-item label="平台创建时间">
                      <el-date-picker v-model="search.time2" @change="choosetime2" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" range-separator="——" start-placeholder="开始日期" end-placeholder="结束日期" ></el-date-picker>
                    </el-form-item>
                </div> -->
								<div class="orderflex ordersub" style="align-items:center">
									<el-button @click="dosearch()" type="danger">搜索订单</el-button>
									<el-button type="danger" @click="daochutishi = true" :loading="daochuing">{{daochuingz}}</el-button>
									<!-- <el-button @click="fixprolog = true" type="danger">批量修改产品</el-button> -->
									<el-select style="margin-left: 20px;" @change="moreflag" clearable v-model="fixstatus" placeholder="批量修改状态">
										<el-option v-for="item in options1" :key="item.value" :label="item.label" :value="item.value"></el-option>
									</el-select>
								</div>
							</el-form>
						</div>
						<div v-if="daochutishi" style=" border: 1px #EAEAEA solid; margin: 0 20px; padding: 10px 10px; background: #fffcf3;">
							<div style="font-size: 14px; margin-bottom: 10px; font-weight: bold; color: #333333;">为了给您提供更好的查询性能以及体验，我们对导出功能进行了更改：</div>
							<div style="padding-left: 20px; font-size: 14px; color: #666666; ">1.为了保证您的查询性能，两次导出的时间请间隔5分钟</div>
							<div style="padding-left: 20px; font-size: 14px; color: #666666; display: flex;  justify-content: space-between; align-items: center;">
								<div>2.我们将为您保留已生成的数据，便于您随时导出使用</div>
								<div>
									<el-button size="mini" type="primary" @click="xiazai">生成报表</el-button>
									<el-button size="mini" type="primary" @click="goxiazai">查看已经生成的报表</el-button>
								</div>
							</div>
						</div>
						<div class="powertable" v-loading="loading">
							<div class="newsearch">
								<div :class="act == 1 ? 'news1 act':'news1'" @click="searchall">全部订单</div>
								<span class="shuxian"><img :src="srcxian"></span>
								<div :class="act == 2 ? 'news1 act':'news1'" @click="getUrgentOrder">加急订单({{num}})</div>
								<span class="shuxian"><img :src="srcxian"></span>
								<div :class="act == 3 ? 'news1 act':'news1'" @click="getUrgentOrder2">自动生产异常的订单({{num2}})</div>
								<span class="shuxian"><img :src="srcxian"></span>
								<!-- <div :class="act == 3 ? 'news1 act':'news1'"  @click="morethan1">购买数量大于1的订单({{morennum}})</div>
                    <span class="shuxian"><img :src="srcxian"></span> -->
							</div>
							<div style="display: flex;" v-if="act == 3">
								<upload-excel-component @on-selected-file="exportData" class="btnp" buttonName="重新提交提交上游"></upload-excel-component>
								<el-button @click="downshuadan2" type="text" style="margin-left:10px;">重新提交提交上游模板</el-button>
							</div>
							<div class="newlist newflex" style="margin-bottom: 10px;">
								<div class="newleft">
									<div class="newthli newthli1"><input type="checkbox" @change="quanxuan" value="0" v-model="quanxuana"></div>
									<div class="newthli newthli2">产品信息</div>
									<div class="newthli newthli3">证件信息&收货信息</div>
									<div class="newthli newthli4">订单状态</div>
									<div class="newthli newthli5">失败原因</div>
									<div class="newthli newthli6">生产信息</div>
									<div class="newthli newthli7">操作</div>
								</div>
							</div>
							<div class="newlist newlistbor" v-for="(item,index) in productDetail" :key="index">
								<div class="newh">

									<div class="newleft">
										<div class="newhli"><input type="checkbox" :value="item.id" @change="danxuan" v-model="danxuans"></div>
										<div class="newhli">订单ID：{{item.id}} <i class="el-icon-document-copy" style="color: #077ECE; font-size: 16px; margin-left: 10px; cursor: pointer;"
											 @click="copys(item.id)"></i></div>
										<div class="newhli">订单来源：{{item.source}} <i class="el-icon-document-copy" style="color: #077ECE; font-size: 16px; margin-left: 10px; cursor: pointer;"
											 @click="copys(item.source)"></i></div>
										<div class="newhli">外部订单编号：{{item.source_id}}
											<i class="el-icon-document-copy" style="color: #077ECE; font-size: 16px; margin-left: 10px; cursor: pointer;"
											 @click="copys(item.source_id)"></i>
											<span v-if="item.source_id.indexOf('-C') != -1">
												<el-popover placement="top-start" width="200" trigger="hover" content="该订单为拆分订单（电商平台购买数量大于2时自动拆分的订单）针对该订单的修改信息、加急、标旗备注、外呼已联系操作都将自动同步修改到其关联的拆分订单上。">
													<span slot="reference">
														<img src="../../../static/img/chai.png" @click="searchbrother(item.real_source_id)" style="width: 20px; margin-left: 10px; position: relative; top: 4px; cursor: pointer;" />
													</span>
												</el-popover>
											</span>
										</div>
										<div class="newhli" v-if="timems == 0">平台创建时间{{item.created_at}}</div>
										<div class="newhli" v-if="timems == 1">状态变更时间{{item.status_updated_at}}</div>
										<div class="newhli" v-if="timems == 2">订单激活时间{{item.activated_at}}</div>

									</div>

									<div class="newright">
										<el-tooltip popper-class="tooltip" effect="dark" placement="top">
											<div slot="content">{{item.memo}}</div>
											<div><span @click="choosecolorid(item.id,item.source_id)" :style="{color:item.flag,fontSize:25+'px'}" class="iconfont icon-flag-fill">
												</span></div>
										</el-tooltip>
									</div>
								</div>
								<div class="newb">
									<div class="newt1">
										<div class="newtitle">产品名称:{{item.supplier_product_name}}</div>
										<div class="newcode">产品编码:{{item.supplier_product_sku}}</div>
										<div class="newcode" v-if="item.plan_mobile != 0">购买号码:{{item.plan_mobile}}</div>
										<div class="newcode" v-if="item.plan_mobile == 0">购买号码:无</div>
										<!--                            <div class="newcode" v-if="item.amount>1">购买数量:购买数量大于1</div>
                            <div class="newcode" v-if="item.amount<=1">购买数量:{{item.amount}}</div> -->
									</div>
									<div class="newt2">
										<div class="newcar">证件姓名：{{item.id_card_name}} <span class="seephoto ml20" @click="seephoto(item.id_card_num,item.id)">查看照片</span></div>
										<div class="newcar">证件号码：{{item.id_card_num}}</div>

										<div class="newcar">收件人：{{item.address_name}} <span class="ml20">联系电话：{{item.address_mobile}}</span></div>

										<div class="newcar">收货地址：{{item.address}}</div>
									</div>
									<div class="newt3">
										<div class="newcar" v-if="act != 3">{{item.status}}</div>
										<div class="newcar" v-if="act == 3">{{item.status_name}}</div>


										<div class="newcar2" style="color: #197cff; cursor: pointer;" @click="seememo(item.producer_memo)">操作记录</div>
										<!-- <div class="newcar">退款状态:{{item.refund_name}}</div> -->
										<div class="newcar">激活状态:{{item.active_name}}</div>
									</div>
									<div class="newt3" v-if="act != 3">
										<el-tooltip effect="dark" popper-class="tooltip" placement="top">
											<div slot="content">{{item.reason}}</div>
											<div style="max-height:100px; overflow: hidden;">{{item.reason}}</div>
										</el-tooltip>
									</div>
									<div class="newt3" v-if="act == 3">
										<el-tooltip effect="dark" popper-class="tooltip" placement="top">
											<div slot="content">{{item.mes_reason}}</div>
											<div style="max-height:100px; overflow: hidden;">{{item.mes_reason}}</div>
										</el-tooltip>
									</div>

									<div class="newt4">

										<div class="newcar">生产号码:</div>
										<div class="newcar" v-if="item.plan_mobile_produced != null">{{item.plan_mobile_produced}}</div>
										<div class="newcar" v-if="item.plan_mobile_produced == null">无</div>
										<div class="newcar" v-if="item.iccid != null">iccid:</div>
										<div class="newcar" v-if="item.iccid != null">{{item.iccid}}</div>
										<div class="newcar" v-if="item.iccid == null"></div>
										<div class="newcar" v-if="item.tracking_company != ''">物流公司：{{item.tracking_company}}</div>
										<div class="newcar" v-if="item.tracking_number != ''">物流单号：{{item.tracking_number}}</div>
									</div>
									<div class="newt5">
										<div class="seebtn" @click="seedetail(item.id)">查看详情</div>
										<div @click="productFail(item.id)">生产失败</div>
										<div @click="fixpro(item.id)">录入生产数据</div>
										<div @click="backorder(item.id)">修改状态</div>
										<div @click="fixorder(item.id,item.source_id)">修改订单信息</div>
										<div v-if="act != 3" @click="fast(item.id,item.source_id)">加急处理</div>
										<div @click="yichuli(item.m_id)">已处理</div>

										<div v-if="act == 3" @click="chongxintijiao(item.id)">重新提交至上游</div>
									</div>

								</div>
							</div>

						</div>
						<el-dialog title="查看照片" :visible.sync="seephotolog2" :close-on-click-modal="false" width="1254px">
							<div v-loading='seephotoloading'>
								<div class="logflex" v-if="act != 3">
									<div class="proimg" v-if="choose.face != ''"><img :src="choose.face" /></div>
									<div class="proimg" v-if="choose.face == ''">暂无照片</div>
									<div class="proimg" v-if="choose.back != ''"><img :src="choose.back" /></div>
									<div class="proimg" v-if="choose.back == ''">暂无照片</div>
									<div class="proimg" v-if="choose.hand != ''"><img :src="choose.hand" /></div>
									<div class="proimg" v-if="choose.hand == ''">暂无照片</div>
								</div>
								<div class="logflex" v-if="act == 3">
									<div class="proimg" v-if="choose.face != ''"><img @click="fixpic($event,'face')" :src="choose.face" /></div>
									<div class="proimg" v-if="choose.face == ''">暂无照片</div>
									<div class="proimg" v-if="choose.back != ''"><img @click="fixpic($event,'back')" :src="choose.back" /></div>
									<div class="proimg" v-if="choose.back == ''">暂无照片</div>
									<div class="proimg" v-if="choose.hand != ''"><img @click="fixpic($event,'hand')" :src="choose.hand" /></div>
									<div class="proimg" v-if="choose.hand == ''">暂无照片</div>


								</div>
							</div>
							<div slot="footer" class="dialog-footer">
								<el-button type="primary" size="small" @click="seephotolog2 = false">好的</el-button>
							</div>
						</el-dialog>

						<!--            <draggable v-model="choose2" :options = "{animation:500}" @change="picdesc">
            		<transition-group  class="diaflex">
            			<div class="reviewphone" v-for="item in choose2" :key="item.which">
            				<div v-if="item.url != ''"><img  @click="fixpic($event,item.which)" :src="item.url" /></div>
            				<div v-if="item.url == ''">暂无照片</div>
            				<span v-if="item.size != '' && item.size <= choosed.pic_size">{{item.size}}k</span>
            				<span class="red" v-if="item.size != '' && item.size > choosed.pic_size"><i class="el-icon-warning-outline"></i>{{item.size}}k</span>
            			</div>
            		</transition-group>
            </draggable> -->

						<el-dialog title="标记退货" :visible.sync="signlog" :close-on-click-modal="false" width="600px">
							<div>
								<el-input type="textarea" :rows="10" placeholder="请直接从EXCEL复制粘贴，一行一个单号。" v-model="signlist"></el-input>
							</div>
							<span slot="footer" class="dialog-footer">
								<el-button type="primary" size="small" @click="signgo">提交退货</el-button>
							</span>
						</el-dialog>
						<el-dialog title="退货结果" :visible.sync="signlog2" width="600px" :close-on-click-modal="false">
							<div>
								<div style="color: #229453; font-size: 16px; padding-bottom: 20px;">成功条数：{{signok}}</div>
								<div style="color: #EEF7FF; font-size: 16px; padding-bottom: 20px; line-height: 30px;">失败及原因：
									<div v-for="item in signno" :key="item" style="padding-left: 20px;">
										{{item}}
									</div>
								</div>
							</div>
							<span slot="footer" class="dialog-footer">
								<el-button type="primary" size="small" @click="signlog2 = false">好的,知道了</el-button>
							</span>
						</el-dialog>
						<el-dialog title="导入结果" :visible.sync="daorulog" width="600px" :close-on-click-modal="false">
							<div v-loading='daoruing'>
								<div style="color: #229453; font-size: 16px; padding-bottom: 20px;" v-if="daoruok != 0">成功条数：{{daoruok}}</div>
								<div style="color: #EEF7FF; font-size: 16px; padding-bottom: 20px; line-height: 30px;">失败及原因：
									<div v-for="item in daorulist" :key="item" style="padding-left: 20px;">
										{{item}}
									</div>
								</div>
							</div>
							<span slot="footer" class="dialog-footer">
								<el-button type="primary" size="small" @click="daorulog = false">好的</el-button>
							</span>
						</el-dialog>
						<el-dialog title="查看操作记录" :close-on-click-modal="false" :visible.sync="seememolog" width="800px">
							<div v-html="memo" style="line-height: 30px;"></div>
							<span slot="footer" class="dialog-footer">
								<el-button type="primary" size="small" @click="seememolog = false">好的</el-button>
							</span>
						</el-dialog>

						<div v-show="isShowNormal" class="pagination-container">
							<el-pagination background @current-change="handleCurrentChange" :current-page="page" :page-size="size" layout="total, prev, pager, next"
							 :total="total"></el-pagination>
						</div>

					</el-tab-pane>
					<el-tab-pane label="自动生产配置" name="second">
						<zidong></zidong>
					</el-tab-pane>
				</el-tabs>
				<el-dialog title="取消订单" :close-on-click-modal="false" :visible.sync="backorderlog" width="30%">
					<span>
						<div class="propipei">
							ID为<span>{{fixid}}</span>的订单将标记为取消订单。
						</div>
					</span>
					<span slot="footer" class="dialog-footer">
						<el-button size="small" @click="backorderlog = false">取 消</el-button>
						<el-button size="small" type="primary" @click="backorderok()">确 定</el-button>
					</span>
				</el-dialog>
				<el-dialog title="录入生产数据" :visible.sync="productDataVisible" :close-on-click-modal="false" width="30%" style="color: #666666">
					<div>
						<el-form ref="form" :model="form" @submit.native.prevent label-width="100px">
							<el-form-item label="生产号码:">
								<el-input v-model="chooseorderlist.plan_mobile_produced" clearable placeholder="请输入内容"></el-input>
							</el-form-item>
							<el-form-item label="物流公司:">
								<el-select style="width:100%" v-model="chooseorderlist.tracking_company_id" @change="wuliuchange" @focus="getTrackCompany"
								 placeholder="请选择">
									<el-option v-for="item in trackCompanyList" :key="item.id" :label="item.company" :value="item.id"></el-option>
								</el-select>
							</el-form-item>
							<el-form-item label="运单号:">
								<el-input v-model="chooseorderlist.tracking_number" :disabled="wuliu0" clearable placeholder="请输入内容"></el-input>
							</el-form-item>
						</el-form>
					</div>
					<div slot="footer" class="dialog-footer">
						<el-button type="primary" size="small" @click="addproductData">确定</el-button>
					</div>
				</el-dialog>
				<el-dialog title="标记为生产失败" :close-on-click-modal="false" :visible.sync="productFailVisible" width="30%" style="color: #666666">
					<div style="font-size:17px;">
						<el-form ref="form" :model="form" @submit.native.prevent label-width="100px">
							<el-form-item label="备注原因:">
								<el-input style="width:100%" v-model="remark_reason" placeholder="请输入内容"></el-input>
							</el-form-item>
						</el-form>
						<el-form ref="form" :model="form" @submit.native.prevent label-width="100px">
							<el-form-item label="快速原因:">
								<div @click="selectTags(item)" style="margin: 5px;display:inline-block; cursor: pointer;" v-for="item in items"
								 :key="item.id">
									<el-tag :key="item.id" type="info" effect="dark">{{ item.label }}</el-tag>
								</div>
							</el-form-item>
						</el-form>
					</div>


					<div slot="footer" class="dialog-footer">
						<el-button type="primary" size="small" @click="productFailButton">确定</el-button>
					</div>
				</el-dialog>
				<el-dialog title="修改信息" :close-on-click-modal="false" :visible.sync="informationVisible" width="500px" style="color: #666666">
					<div>
						<el-form ref="form" @submit.native.prevent :model="form" label-width="100px">
							<el-form-item label="收货人：">
								<el-input v-model="address_name"></el-input>
							</el-form-item>
							<el-form-item label="身份证姓名：">
								<el-input v-model="id_card_name"></el-input>
							</el-form-item>
							<el-form-item label="身份证号：">
								<el-input v-model="id_card_num"></el-input>
							</el-form-item>
							<el-form-item label="联系电话：">
								<el-input v-model="address_mobile"></el-input>
							</el-form-item>
							<el-form-item label="收货地址：">
								<el-cascader style="width:100%" size="large" :options="areaoptions" v-model="selectedOptions" @change="handleChange"></el-cascader>
								<span class="handgo" @click="handssq = true">没找到？手动填写</span>
							</el-form-item>
							<div class="ssq" v-if="handssq">
								<el-form-item label="手动填写：">
									<el-input v-model="handsheng" placeholder="省"></el-input>
									<el-input v-model="handshi" placeholder="市"></el-input>
									<el-input v-model="handqu" placeholder="区"></el-input>
								</el-form-item>
							</div>
							<el-form-item label="详细地址：">
								<el-input v-model="address" style="width:100%" placeholder="请输入详细地址"></el-input>
							</el-form-item>
						</el-form>
						<div style="padding-left: 20px;" v-if="amountchai.indexOf('-C') != -1">
							<span style="color: #DD2727;">注：</span>
							当前订单为拆分订单（电商平台购买数量大于2时自动拆分订单）该操作将同步修改其它拆分关联订单的订单信息。
							<span>
								<el-checkbox v-model="tongbu">同步修改</el-checkbox>
							</span>
						</div>
					</div>
					<div slot="footer" class="dialog-footer">
						<el-button type="primary" size="small" @click="updateInformation">确定</el-button>
					</div>
				</el-dialog>
				<el-dialog title="修改状态" :close-on-click-modal="false" :visible.sync="statusVisible" width="30%" style="color: #666666">
					<div>
						<el-form ref="form" :model="form" @submit.native.prevent label-width="120px">
							<el-form-item label=" 选择状态：">
								<el-select v-model="updatedS" clearable placeholder="请选择">
									<el-option style="width:100%" v-for="item in options1" :key="item.value" :label="item.label" :value="item.value"></el-option>
								</el-select>
							</el-form-item>
							<el-form-item label="备注原因：">
								<el-input placeholder="请输入内容" style="width:100%" v-model="remarks"></el-input>
							</el-form-item>
						</el-form>
					</div>
					<div slot="footer" class="dialog-footer">
						<el-button type="primary" size="small" @click="updateStatus">确定</el-button>
					</div>
				</el-dialog>

				<el-dialog title="批量修改状态" :close-on-click-modal="false" :visible.sync="statusVisible2" width="30%" style="color: #666666">
					<div>
						<el-form ref="form" :model="form" @submit.native.prevent label-width="120px">
							<el-form-item label=" 选择状态：">
								<el-select v-model="fixstatus" clearable placeholder="请选择">
									<el-option style="width:100%" v-for="item in options1" :key="item.value" :label="item.label" :value="item.value"></el-option>
								</el-select>
							</el-form-item>
							<el-form-item label="备注原因：">
								<el-input placeholder="请输入内容" style="width:100%" v-model="fixremarks"></el-input>
							</el-form-item>
						</el-form>
					</div>
					<div slot="footer" class="dialog-footer">
						<el-button type="primary" size="small" @click="moreflag">确定</el-button>
					</div>
				</el-dialog>




				<el-dialog title="修改商品" :visible.sync="fixprolog" width="30%" :close-on-click-modal="false">
					<div style="padding-right: 30px;">
						<el-form ref="form" @submit.native.prevent :model="search" label-width="150px">
							<el-form-item label="通过商品名称修改:">
								<el-input v-model="fixproname" :disabled="fixpronameshow" @input="searchproname" placeholder="输入商品名称"></el-input>
							</el-form-item>

							<el-form-item label="通过商品编码修改:">
								<el-input v-model="fixprocode" :disabled="fixprocodeshow" @input="searchprocode" placeholder="输入商品编码"></el-input>
							</el-form-item>
							<el-form-item label="查询结果:">
								{{fixpronames}}
							</el-form-item>
						</el-form>

					</div>
					<div slot="footer" class="dialog-footer">
						<el-button @click="fixprolog = false">取 消</el-button>
						<el-button type="primary" @click="fixprook()" :loading="fixproing">确 定</el-button>
					</div>
				</el-dialog>

				<el-dialog title="加急" :close-on-click-modal="false" :visible.sync="fastlog" width="30%">
					<span>
						<div class="propipei">
							ID为
							<span>{{fixid}}</span>的订单将标记为加急。
						</div>
						<div style="padding-top: 20px;" v-if="amountchai.indexOf('-C') != -1"><span style="color: #DD2727;">注：</span>当前订单为拆分订单（电商平台购买数量大于2时自动拆分订单）该操作是否同步加急其它拆分关联订单？</div>
					</span>
					<span slot="footer" class="dialog-footer">
						<el-button size="small" @click="fastlog = false">取 消</el-button>
						<el-button size="small" type="primary" @click="fastok()">确 定</el-button>
					</span>
				</el-dialog>
				<el-dialog title="标旗设置" :close-on-click-modal="false" :visible.sync="flaglog" width="600px">
					<div style="display: flex;">
						<div style=" padding:0 20px; position: relative; top: 5px; ">标旗：</div>
						<el-radio-group v-model="flagradio" style="display: flex;">

							<el-tooltip style="margin-right: 20px;" popper-class="tooltip" effect="dark" placement="top" v-for="item in flaglist"
							 :key="item.id">
								<div slot="content">{{item.flag}}</div>
								<div>
									<el-radio :label="item.type"><span :style="{color:item.color,fontSize:25+'px'}" class="iconfont icon-flag-fill">
										</span></el-radio>
								</div>
							</el-tooltip>

						</el-radio-group>
					</div>
					<div style="display: flex; margin-top: 20px; width: 530px;">
						<div style=" padding:0 20px; position: relative; top: 5px; width: 100px;">修改备注：</div>
						<el-input type="textarea" :rows="3" placeholder="请输入备注" v-model="flagarea"></el-input>
					</div>
					<div style="padding-left: 20px; padding-top: 20px;" v-if="amountchai.indexOf('-C') != -1"><span style="color: #DD2727;">注：</span>当前订单为拆分订单（电商平台购买数量大于2时自动拆分的订单）该操作将同步修改其它拆分关联订单的备注。</div>
					<span slot="footer" class="dialog-footer">
						<el-button size="small" type="primary" @click="flagloggo">确定</el-button>
					</span>
				</el-dialog>
				<el-dialog title="修改产品结果" :visible.sync="shoplog" :close-on-click-modal="false" width="600px">
					<div>
						<div style="color: #077ECE; line-height: 30px;">成功{{shoplist.success}}条</div>
						<div style="color: #DF3434; line-height: 30px;">失败及原因：
							<div v-for="(item,i) in shoplist.error" :key="i">
								订单ID为:{{i}}的修改结果{{item}}
							</div>
						</div>
					</div>
					<div slot="footer" class="dialog-footer">
						<el-button type="primary" size="small" @click="shoplog = false">好的</el-button>
					</div>
				</el-dialog>
				<el-dialog title="图片裁剪" :visible.sync="piclog" :close-on-click-modal="false" width="1254px" top="0">
					<div class="jianqieall">
						<div>
							<el-button type="primary" size="small" @click="xuanzhuan">右旋转90度</el-button>
						</div>
						<div>
							<el-button size="small" @click="piclog = false">取消</el-button>
							<el-button type="primary" size="small" @click="dopic()">确定保存</el-button>
						</div>
					</div>
					<div class="jianqie">
						<vueCropper ref="cropper" :img="picurl" maxImgSize="1000" :centerBox="false" :infoTrue="false" :full="false"
						 :info="true" :autoCrop="true" autoCropWidth="500" autoCropHeight="500"></vueCropper>
					</div>
					<!-- <span slot="footer" class="dialog-footer">
        		<el-button size="small"  @click="piclog = false">取 消</el-button>
        		<el-button type="primary" size="small" @click="dopic()">确 定</el-button>
        	 </span> -->
				</el-dialog>

				<el-dialog title="请输入导出密码" :visible.sync="mimalog" width="400px" :close-on-click-modal="false">
					<div style="padding-right: 30px;">
						<el-input v-model="mima" show-password placeholder="请输入导出密码"></el-input>
					</div>
					<div slot="footer" class="dialog-footer">
						<el-button size="medium" type="primary" @click="mimaqueren">确 定</el-button>
						<el-button size="medium" type="text" @click="mimachongzhilog = true">重设密码</el-button>
					</div>
				</el-dialog>


				<el-dialog title="请设置导出密码" :visible.sync="mimasetlog" width="400px" :close-on-click-modal="false">
					<!--              <div style="padding-right: 30px; margin-bottom: 20px;">
                   <el-input v-model="mimashoujihao" disabled placeholder="请输入验证码"></el-input>
              </div>
              <div style="padding-right: 30px; margin-bottom: 20px; position: relative;">
                   <el-input v-model="mimacode"  placeholder="请输入验证码"></el-input>
                   <el-button style="padding: 9px 30px; position: absolute; right: 31px; top: 1px;"  type="danger" @click="getcode" :disabled="jinyong" size="mini">{{tishi}}</el-button>
              </div> -->
					<div style="padding-right: 30px; margin-bottom: 20px;">
						<el-input v-model="mimaset" show-password placeholder="请设置导出密码"></el-input>
					</div>
					<div style="padding-right: 30px;">
						<el-input v-model="mimaset2" show-password placeholder="请再次输入确认导出密码"></el-input>
					</div>
					<div style="color: #DF3434; margin-top: 10px;">为了您的订单数据安全，即日起所有批量导出数据的出口需输入导出密码才可导出，请与联系店铺负责人协商设置该密码</div>

					<div slot="footer" class="dialog-footer">
						<el-button size="medium" @click="mimasetlog = false">取 消</el-button>
						<el-button size="medium" type="primary" @click="mimasetqueren">确 定</el-button>
					</div>
				</el-dialog>

				<el-dialog title="重设密码" :visible.sync="mimachongzhilog" width="400px" :close-on-click-modal="false">
					<div style="padding-right: 30px; margin-bottom: 20px;">
						<el-input v-model="mimashoujihao" disabled placeholder="请输入验证码"></el-input>
					</div>
					<div style="padding-right: 30px; margin-bottom: 20px; position: relative;">
						<el-input v-model="mimacode" placeholder="请输入验证码"></el-input>
						<el-button style="padding: 9px 30px; position: absolute; right: 31px; top: 1px;" type="danger" @click="getcode"
						 :disabled="jinyong" size="mini">{{tishi}}</el-button>
					</div>
					<div style="padding-right: 30px; margin-bottom: 20px;">
						<el-input v-model="mimaset" show-password placeholder="请输入新密码"></el-input>
					</div>
					<div style="padding-right: 30px;">
						<el-input v-model="mimaset2" show-password placeholder="请确认新密码"></el-input>
					</div>
					<div slot="footer" class="dialog-footer">
						<el-button size="medium" @click="mimachongzhilog = false">取 消</el-button>
						<el-button size="medium" type="primary" @click="mimaqueren2">确 定</el-button>
					</div>
				</el-dialog>


			</div>
		</div>
		<foot></foot>
	</div>
</template>

<script>
	
	import zidong from '@/components/productionManagement/zidong.vue'
	import draggable from 'vuedraggable'
	import top from "@/components/top.vue";
	import left from "@/components/left.vue";
	import foot from "@/components/foot.vue"
	import UploadExcelComponent from "@/components/UploadExcel/index.vue";
	import {
		regionData,
		CodeToText,
		TextToCode
	} from 'element-china-area-data'
	import axios from "axios";
	import router from "@/router";
	import moment from 'moment'
	var url;
	if (window.location.href.indexOf("91haoka.com") > -1) {
		url = "http://test.91haoka.com:8998";
	} else {
		url = "";
	}
	export default {
		components: {
			left: left,
			top: top,
			foot: foot,
			UploadExcelComponent,
			draggable,
			zidong
		},
		data() {
			return {
				piclog: false,
				picurl: "",
				uploadpic: "",

				tongbu: false,
				timems: '0',
				timemschoose: "",

				handsheng: "",
				handshi: "",
				handqu: "",
				handssq: false,

				srcxian: "./static/img/shuxian.png",
				shoplog: false,
				shoplist: [],

				fixpronameshow: false,
				fixprocodeshow: false,
				fixproname: "",
				fixprocode: "",
				fixpronames: "",
				fixproid: "",
				fixproing: false,

				daochuing: false,
				daochuingz: "导出信息",

				wuliu0: false,
				statusVisible2: false,
				fixremarks: "",
				fixstatus: "",
				form: {},
				choose: {
					face: "",
					back: "",
					hand: ""
				},

				danxuans: [],
				quanxuana: false,
				quanxuans: [],


				flaglog: false,
				flagradio: 0,
				flagarea: "",
				chooseid: "",

				signlog: false,
				signlist: "",

				signlog2: false,
				signok: 0,
				signno: [],

				daorulog: false,
				daoruok: 0,
				daorulist: [],
				daoruing: false,

				seephotolog2: false,
				seephotoloading: false,

				kainum: 0,
				shennum: 0,
				memo: "",
				seememolog: false,
				act: 1,
				trackCompanyList: [],
				fastlog: false,
				backorderlog: false,
				fixchooselist: {},
				fixchooselist2: {},
				fixprolog: false,
				chooseorderlist: {},
				isExportVisible: false,
				progressVisible: false,
				percentage: 10,
				colors: [{
						color: "#EEF7FF",
						percentage: 20
					},
					{
						color: "#e6a23c",
						percentage: 40
					},
					{
						color: "#5cb87a",
						percentage: 60
					},
					{
						color: "#1989fa",
						percentage: 80
					},
					{
						color: "#6f7ad3",
						percentage: 100
					}
				],
				fuzhi: "",
				isShowNormal: true,
				loading: true,
				loading1: true,
				total: 0,
				export_data: "批量导入生产数据",
				updatedAddressVisible: false,
				color: "",
				addAddressVisible: false,
				button: "",
				title: "",
				product_remark: "",
				sp_products: [],
				sp_product: "",
				productAddress: [

				],
				amountchai: '',
				address: "",
				id_card_name: "",
				id_card_num: "",
				address_mobile: "",
				address_province: "",
				address_city: "",
				address_district: "",
				address_name: "",
				areaoptions: regionData,
				selectedOptions: [],
				remarks: "",
				selected: "",
				updatedS: "",
				informationVisible: false,
				statusVisible: false,
				submitList: [],
				productQueryList: [],
				productQuery: "",
				selectProductList: [],
				productLists: [],
				productFilterVisible: false,
				remark_reason: "",
				productFailVisible: false,
				productDataVisible: false,
				product_number: "",
				Tracking_number: "",
				productDetail: [

				],
				options1: [

					{
						value: "120",
						label: "初步审核"
					},
					{
						value: "140",
						label: "等待填写身份信息"
					},
					{
						value: "150",
						label: "等待上传照片"
					},

					{
						value: "-200",
						label: "证件不合格待重传"
					},

					{
						value: "0",
						label: "订单终止"
					},

					{
						value: "200",
						label: "待审核"
					},
					{
						value: "450",
						label: "待开卡"
					},
					{
						value: "460",
						label: "已领取"
					},
					{
						value: "470",
						label: "开卡中"
					},
					{
						value: "500",
						label: "待发货"
					},
					{
						value: "550",
						label: "已发货"
					},

					// {
					//   value: "5000",
					//   label: "已激活"
					// },

					{
						value: "-460",
						label: "开卡失败"
					}
				],
				options: [{
						value: "450",
						label: "待开卡"
					},
					{
						value: "460",
						label: "已领取"
					},
					{
						value: "470",
						label: "开卡中"
					},
					{
						value: "500",
						label: "待发货"
					}
				],
				num: 0,
				num2: 0,
				morennum: 0,
				activeName: "first",
				page: 1,
				size: 20,
				total2: 0,
				channels: [],
				search: {
					mobile: "",
					address: "",
					fahuo: '',
					jihuo: '',
					iccid: "",
					flag: "",
					source: "",
					card_num: "",
					good_sku: "",
					tracking_number: "",
					id: "",
					source_id: "",
					wuliu: "",
					daili: "",
					order_id: "",
					sku: "",
					product_id: "",
					channel_id: "",
					product_name: "",
					sp_id: "",
					share_name: "",
					merchant_name: "",
					product_sku: "",
					status: "",

					start: "",
					end: "",

					status_at_start: "",
					status_at_end: "",

					activated_at_start: "",
					activated_at_end: "",

					plan_mobile_produced: ""
				},
				fixid: "",
				addressItem: "",
				currentId: "",
				items: [{
						id: 1,
						label: "手持照片不合格"
					},
					{
						id: 2,
						label: "长得太帅。。。"
					},
					{
						id: 3,
						label: "心情不好"
					},
					{
						id: 4,
						label: "手持照片不合格"
					}
				],
				type: "",
				isButton: false,
				publicData: [],
				currentItem: {},
				time: "",
				amount: 0,
				showExport: true,
				url: "",

				flaglist: [],
				flag: 2,

				mimalog: false,
				mima: "",
				mimaid: "",
				mimasetlog: false,
				mimaset: "",
				mimaset2: "",
				mimachongzhilog: false,
				mimashoujihao: "",
				mimacode: "",
				count: 60,
				tishi: "获取验证码",
				jinyong: false,
				daochutishi: false
			};
		},
		created() {

			//地址配置,用于下载模板
			if (window.location.href.indexOf("91haoka_platform") > -1) {
				console.log("线上项目，谨慎操作。")
				this.url = window.location.origin + "/91haoka_platform/"
			} else {
				this.url = ""
			}

			//按回车键搜索
			var that = this
			document.onkeydown = function(e) {
				var ev = document.all ? window.event : e;
				if (ev.keyCode == 13) {
					that.dosearch()
				}
			}
			
			//导出密码
			if( localStorage.getItem("daochumima") != null){
				this.mima = localStorage.getItem("daochumima")
			}

			//获取所有产品
			axios
				.get("/api/gth/products?_page_size=10000")
				.then(function(response) {
					console.log(response);
					const status = response.status;
					const data = response.data.data.data;
					const msg = response.data.msg;
					if (status === 200 && msg.code === 0) {
						that.productQueryList = data;
					} else {
						if (status !== 200) {
							that.$message.error("网络异常");
						} else {
							that.$message.error(msg.info);
						}
					}
				})


			//第一次加载设置一个默认的时间一个月  不然太卡
			this.search.end = moment().add(1, 'days').format("YYYY-MM-DD 00:00:00");
			this.search.start = moment().subtract(7, 'days').format("YYYY-MM-DD 00:00:00");

			this.timemschoose = [this.search.start, this.search.end]

			this.zidongshengchanshibai2()

			this.getFirstData();
			this.getTrackCompany()
			this.getflag();
			this.getshoujihao()

			//导出生产的按钮功能
			// this.user_func = localStorage.getItem('user_function').split(",");
			// if(this.user_func.indexOf('030105')>=0){this.showExport = true}
		},
		methods: {
			//新增已处理
			yichuli: function(id) {
				var that = this
				axios.post('/api/system/message/status', {
						status: 2,
						id: id
					})
					.then(response => {
						if (response.data.msg.code == 0) {
							that.$message({
								message: '修改状态成功！',
								type: 'success'
							});
							that.zidongshengchanshibai()
						} else {
							that.$message.error(response.data.msg.info);
						}
					})
			},
			goxiazai: function() {
				let routeData = this.$router.resolve({
					path: '/order_export2'
				});
				window.open(routeData.href, '_blank');

				// this.$router.push({
				//   path:'/order_export2'
				// })
			},
			//重置密码确认
			mimaqueren2: function() {
				if (this.mimaset != this.mimaset2) {
					this.$message.error("输入的密码不一致");
					return false
				}
				axios.post("/api/plan-market/shop/pwd", {
						mobile: this.mimashoujihao,
						sms_code: this.mimacode,
						password: this.mimaset
					})
					.then(response => {
						if (response.data.msg.code == 0) {
							this.$message.success("密码设置成功");
							this.mimachongzhilog = false
						} else {
							this.$message.error(response.data.msg.info);
						}
					})
			},
			//获取验证码
			getcode: function() {
				var that = this;
				var params = new URLSearchParams();
				params.append('mobile', this.mimashoujihao);
				axios.post('/api/auth/sms_code', params)
					.then(response => {
						if (response.data.msg.code == 0) {
							this.$message({
								message: '验证码已发送！',
								type: 'success'
							});
							that.daojishi()
						} else {
							this.$message.error(response.data.msg.info);
						}
					})
			},
			//倒计时功能
			daojishi: function() {
				var interval;
				interval = window.setInterval(() => {
					if (this.count <= 0) {
						window.clearInterval(interval)
						this.tishi = "获取验证码",
							this.jinyong = false
						this.count = 60
					} else {
						this.count -= 1;
						this.tishi = this.count + "秒重新获取"
						this.jinyong = true
					}
				}, 1000);
			},
			//获取手机号发验证码
			getshoujihao: function() {
				axios.get("/api/gth/my/shop/mobile")
					.then(response => {
						if (response.data.msg.code == 0) {
							this.mimashoujihao = response.data.data
						} else {
							this.$message.error(response.data.msg.info);
						}
					})
			},
			//密码设置
			mimasetqueren: function() {
				if (this.mimaset != this.mimaset2) {
					this.$message.error("输入的密码不一致");
					return false
				}
				axios.post("/api/plan-market/shop/pwd", {
						mobile: this.mimashoujihao,
						sms_code: this.mimacode,
						password: this.mimaset
					})
					.then(response => {
						if (response.data.msg.code == 0) {
							this.$message.success("密码设置成功");
							this.mimasetlog = false
						} else {
							this.$message.error(response.data.msg.info);
						}
					})
			},
			//确认密码下载
			mimaqueren: function() {
				// this.daochu()
				this.exportInformation()
				// axios.post("/api/plan-market/shop/log/url",{id:this.mimaid,password:this.mima})
				//     .then(response =>{
				//         if(response.data.msg.code == 0){
				//           if(window.location.href.indexOf("91haoka_platform") > -1){
				//             console.log("线上项目，谨慎操作。")
				//             this.url = window.location.origin+"/"
				//           }else{
				//             this.url = ""
				//           }
				//           var a = document.createElement('a');

				//           a.setAttribute('href', this.url+response.data.data.local_filename);
				//           a.click();
				//         }else{
				//             this.$message.error(response.data.msg.info);
				//         }
				//     })
			},
			xiazai: function() {

				//判断有没有密码
				var that = this
				axios.get("/api/plan-market/shop/pwd")
					.then(function(response) {
						if (response.data.msg.code == 0) {
							console.log(response)
							if (response.data.data == "") {
								//要设置密码
								that.mimasetlog = true
							} else {
								//输入密码
								that.mimalog = true
							}
						} else {
							that.$message.error(response.data.msg.info);
						}
					});

				//没有密码设置  有密码下载
				//地址配置,用于下载模板
				// if(window.location.href.indexOf("91haoka_platform") > -1){
				// 	console.log("线上项目，谨慎操作。")
				// 	this.url = window.location.origin+"/"
				// }else{
				// 	this.url = ""
				// }
				// var a = document.createElement('a');

				// a.setAttribute('href', this.url+url);
				// a.click();
			},

			//点击照片进行修改照片
			fixpic: function(e, whopic) {
				this.picurl = e.target.src
				this.piclog = true
				//点击照片时候定下来修改的是哪张照片
				this.uploadpic = whopic
			},
			//旋转90度
			xuanzhuan: function() {
				this.$refs.cropper.rotateLeft()
			},
			//修建照片后上传
			dopic: function() {
				var that = this
				this.reviewloading = true
				this.$refs.cropper.getCropBlob((data) => {
					var formData = new FormData();
					formData.append("id_num", that.choose.id_card_num);
					formData.append("order_id", that.choose.id);
					formData.append("pic[" + this.uploadpic + "]", data);
					formData.append("type", "plan");
					axios.post('/api/ROS/plan/photo/cut', formData)
						.then(response => {
							axios.get('/api/plan-market/order/photos/url?id_card_num=' + that.choose.id_card_num + '&id=' + that.choose.id)
								.then(response => {
									if (response.data.msg.code != 0) {
										that.$message.error(response.data.msg.info);
									} else {
										var random = Math.random()
										if (response.data.data.face_url != '') {
											that.choose.face = response.data.data.face_url + '?v=' + random
										} else {
											that.choose.face = ''
										}
										if (response.data.data.back_url != '') {
											that.choose.back = response.data.data.back_url + '?v=' + random
										} else {
											that.choose.back = ''
										}
										if (response.data.data.hand_url != '') {
											that.choose.hand = response.data.data.hand_url + '?v=' + random
										} else {
											that.choose.hand = ''
										}
										that.piclog = false
										that.$message.success('上传成功');
									}
								})
						})
				})
			},
			//修改产品查询
			searchproname: function() {

				if (this.fixproname == "") {
					this.fixprocodeshow = false
				} else {
					this.fixprocodeshow = true
				}

				this.fixpronames = "查询中..."
				axios.get('/api/plan-market/order-page/my?title=' + encodeURIComponent(this.fixproname))
					.then(response => {
						if (response.data.msg.code != 0) {
							this.$message.error(response.data.msg.info);
						} else {
							if (response.data.data == null) {
								this.fixpronames = "销售中心无该产品信息"
								this.fixproid = ""
							} else {
								this.fixproid = response.data.data.id
								this.fixpronames = response.data.data.title
							}

						}
					})
			},
			//修改产品查询
			searchprocode: function() {
				if (this.fixprocode == "") {
					this.fixpronameshow = false
				} else {
					this.fixpronameshow = true
				}
				this.fixpronames = "查询中..."
				axios.get('/api/plan-market/order-page/my?fetch_code=' + encodeURIComponent(this.fixprocode))
					.then(response => {
						if (response.data.msg.code != 0) {
							this.$message.error(response.data.msg.info);
						} else {
							if (response.data.data == null) {
								this.fixpronames = "没有查询到商品"
								this.fixproid = ""
							} else {
								this.fixproid = response.data.data.id
								this.fixpronames = response.data.data.title
							}
						}
					})
			},
			//修改商品ok
			fixprook: function() {
				var arr = ""
				for (var i in this.danxuans) {
					console.log(this.danxuans[i])
					arr = arr + this.danxuans[i] + ","
				}
				arr = arr.substring(0, arr.lastIndexOf(','));
				if (this.fixproid == "" || this.danxuans == "") {
					this.$message.error("请选择要修改的订单和商品");
					return false
				}
				this.fixproing = true
				var that = this
				axios.post('/api/plan-market/order/product/update', {
						page_id: this.fixproid,
						ids: arr
					})
					.then(response => {
						if (response.data.msg.code != 0) {
							that.$message.error(response.data.msg.info);
						} else {
							if (response.data.data.error == "") {
								this.fixproing = false
								that.$message({
									message: '修改商品成功',
									type: 'success'
								});
								that.getFirstData()
								that.fixprolog = false
							} else {
								that.shoplist = response.data.data
								that.shoplog = true

								this.fixproing = false
								that.getFirstData()
								that.fixprolog = false
							}

						}
					})
			},
			//选择时间
			timemschange: function() {
				console.log(this.timems)
				if (this.timemschoose == null) {
					this.search.start = ""
					this.search.end = ""
					this.search.status_at_start = ""
					this.search.status_at_end = ""
					this.search.activated_at_start = ""
					this.search.activated_at_end = ""
				} else {
					if (this.timems == 0) {
						this.search.start = this.timemschoose[0]
						this.search.end = this.timemschoose[1]
						this.search.status_at_start = ""
						this.search.status_at_end = ""
						this.search.activated_at_start = ""
						this.search.activated_at_end = ""
					}
					if (this.timems == 1) {
						this.search.start = ""
						this.search.end = ""
						this.search.status_at_start = this.timemschoose[0]
						this.search.status_at_end = this.timemschoose[1]
						this.search.activated_at_start = ""
						this.search.activated_at_end = ""
					}
					if (this.timems == 2) {
						this.search.start = ""
						this.search.end = ""
						this.search.status_at_start = ""
						this.search.status_at_end = ""
						this.search.activated_at_start = this.timemschoose[0]
						this.search.activated_at_end = this.timemschoose[1]
					}
				}
			},
			//选择时间
			timechange: function() {
				if (this.timemschoose == null) {
					this.search.start = ""
					this.search.end = ""
					this.search.status_at_start = ""
					this.search.status_at_end = ""
					this.search.activated_at_start = ""
					this.search.activated_at_end = ""
				} else {
					if (this.timems == 0) {
						this.search.start = this.timemschoose[0]
						this.search.end = this.timemschoose[1]
						this.search.status_at_start = ""
						this.search.status_at_end = ""
						this.search.activated_at_start = ""
						this.search.activated_at_end = ""
					}
					if (this.timems == 1) {
						this.search.start = ""
						this.search.end = ""
						this.search.status_at_start = this.timemschoose[0]
						this.search.status_at_end = this.timemschoose[1]
						this.search.activated_at_start = ""
						this.search.activated_at_end = ""
					}
					if (this.timems == 2) {
						this.search.start = ""
						this.search.end = ""
						this.search.status_at_start = ""
						this.search.status_at_end = ""
						this.search.activated_at_start = this.timemschoose[0]
						this.search.activated_at_end = this.timemschoose[1]
					}
				}

			},

			//物流修改
			wuliuchange: function() {

				if (this.chooseorderlist.tracking_company_id == 1000) {
					this.wuliu0 = true
					this.chooseorderlist.tracking_number = "无需物流"
				} else {
					this.wuliu0 = false
					this.chooseorderlist.tracking_number = ""
				}
			},
			//获取旗子
			getflag: function() {
				axios.get('/api/gth/shop/flag/info')
					.then(response => {

						for (var i in response.data.data) {

							if (response.data.data[i].type == 0) {
								response.data.data[i].color = "#e4dfd7"
							}
							if (response.data.data[i].type == 1) {
								response.data.data[i].color = "#ee3f4d"
							}
							if (response.data.data[i].type == 2) {
								response.data.data[i].color = "#ebb10d"
							}
							if (response.data.data[i].type == 3) {
								response.data.data[i].color = "#229453"
							}
							if (response.data.data[i].type == 4) {
								response.data.data[i].color = "#2775b6"
							}
							if (response.data.data[i].type == 5) {
								response.data.data[i].color = "#8076a3"
							}
						}

						this.flaglist = response.data.data
					})
			},
			//批量修改状态
			moreflag: function() {
				var arr = ""
				for (var i in this.danxuans) {
					console.log(this.danxuans[i])
					arr = arr + this.danxuans[i] + ","
				}
				arr = arr.substring(0, arr.lastIndexOf(','));
				if (this.fixstatus == "" || this.danxuans == "") {
					this.$message.error("请选择要修改的订单和状态");
					return false
				}
				this.loading = true

				axios.post('/api/gth/orders/handle', {
						status: this.fixstatus,
						ids: arr,
						status_memo: this.fixremarks
					})
					.then(response => {
						if (response.data.msg.code == 0) {
							this.$message({
								message: '批量修改状态成功',
								type: 'success'
							});
							this.getFirstData()

							//事后清除一下
							this.fixremarks = ""
							this.fixstatus = ""
							this.arr = ""
							this.statusVisible2 = false
							this.danxuans = []
							this.quanxuana = false
						} else {
							this.loading = false
							this.$message.error(response.data.msg.info);

						}
					})
			},

			//全选的ids集合
			ids: function() {
				var checkids = []
				for (var i in this.productDetail) {
					checkids.push(this.productDetail[i].id)
				}
				this.quanxuans = checkids
			},
			//点击全选
			quanxuan: function() {

				if (this.danxuans.length != this.quanxuans.length || this.danxuans.length == 0) {
					this.danxuans = this.quanxuans
					this.quanxuana = true
				} else {
					this.danxuans = []
					this.quanxuana = false
				}

			},
			//点击单选
			danxuan: function() {
				console.log(this.danxuans)
				// this.choosearea.push(this.checkedarea)
				if (this.danxuans.length == this.quanxuans.length) {
					this.quanxuana = true
				} else {
					this.quanxuana = false
				}
			},
			//选择标旗id
			choosecolorid: function(id, source_id) {
				//查看是否是拆单的
				this.amountchai = source_id

				this.chooseid = id
				this.flaglog = true
				axios.get('/api/plan-market/order/memo?id=' + id)
					.then(response => {
						this.flagarea = response.data.data.memo
						this.flagradio = response.data.data.flag
					})
			},
			//选择标旗确认
			flagloggo: function() {
				axios.post('/api/plan-market/order/flag', {
						color: this.flagradio,
						id: this.chooseid,
						memo: this.flagarea
					})
					.then(response => {
						this.loading = true
						this.flaglog = false
						this.getFirstData()
					})
			},
			//选择标旗
			choosecolor: function(val) {
				axios.post('/api/plan-market/order/flag', {
						color: val,
						id: this.chooseid
					})
					.then(response => {
						this.getFirstData()
					})

			},
			//标记订单退货
			signgo: function() {
				// var arr = this.signlist
				// var arrs =[]
				// if(arr.indexOf(",")>=0 && arr.indexOf("，")>=0){
				//     this.$message.error("请使用中文或者英文的逗号，不要两种都使用");
				//     return false
				// }
				// if(arr.indexOf(",")<0 && arr.indexOf("，")<0){
				//     arrs.push(arr)
				// }
				// if(arr.indexOf(",")>=0){
				//     arrs = arr.split(',')
				// }
				// if(arr.indexOf("，")>=0){
				//     arrs = arr.split('，')
				// }

				let duoxuanids2
				duoxuanids2 = this.signlist.split(/\n/)
				for (let i in this.duoxuanids2) {
					duoxuanids2[i] = duoxuanids2[i].trim()
				}

				axios.post("/api/plan-market/order/return", {
						tracking_numbers: duoxuanids2
					})
					.then(response => {
						if (response.data.msg.code == 0) {
							this.signlog = false
							this.signlog2 = true
							this.signok = response.data.data.success
							this.signno = response.data.data.errors

							this.signlist = ''
						} else {
							this.$message.error(response.data.msg.info);
						}
					});
			},
			//查看照片
			seephoto: function(id_card_num, ordernum) {
				this.choose.face = ""
				this.choose.back = ""
				this.choose.hand = ""
				this.choose.id = ordernum;
				this.choose.id_card_num = id_card_num;
				//没加载之前
				this.seephotolog2 = true
				this.seephotoloading = true

				var that = this
				axios.get('/api/plan-market/order/photos/url?id_card_num=' + id_card_num + '&id=' + ordernum)
					.then(response => {
						if (response.data.msg.code != 0) {
							that.$message.error(response.data.msg.info);
						} else {
							var random = Math.random()
							if (response.data.data.face_url != '') {
								that.choose.face = response.data.data.face_url + '?v=' + random
							} else {
								that.choose.face = ''
							}
							if (response.data.data.back_url != '') {
								that.choose.back = response.data.data.back_url + '?v=' + random
							} else {
								that.choose.back = ''
							}
							if (response.data.data.hand_url != '') {
								that.choose.hand = response.data.data.hand_url + '?v=' + random
							} else {
								that.choose.hand = ''
							}
							that.seephotoloading = false
						}
					})
			},
			//查看操作记录
			seememo: function(memo) {
				this.memo = memo
				this.seememolog = true
			},
			//审核失败的订单
			shenfail: function() {
				this.act = 2
				this.form.status = "-200"
				this.loading = true
				this.getlist()
			},
			//开卡失败的订单
			kaifail: function() {
				this.act = 3
				this.form.status = "-460"
				this.loading = true
				this.getlist()
			},

			//数量大于1的订单
			morethan1: function() {
				this.flag = 2
				this.form.status = "0"
				this.page = 1
				this.act = 3
				this.loading = true
				this.getFirstData()
			},
			searchall: function() {
				this.flag = 2
				this.page = 1
				this.act = 1
				this.loading = true
				this.getFirstData()
			},

			//获取物流公司
			getTrackCompany() {
				const that = this;
				axios
					.get("/api/plan-market/logistics-companies")
					.then(function(response) {
						console.log(response);
						const status = response.status;
						const data = response.data.data;
						const msg = response.data.msg;
						if (status === 200 && msg.code === 0) {
							that.trackCompanyList = data;
						} else {
							if (status !== 200) {
								that.$message.error("网络异常");
							} else {
								that.$message.error(msg.info);
							}
						}
					});
			},

			//加急处理
			fastok: function() {

				var that = this;
				var params = new URLSearchParams();
				params.append("id", this.fixid);
				axios.post("/api/plan-market/order/accelerate", params).then(response => {
					if (response.data.msg.code != 0) {
						this.$message.error(response.data.msg.info);
					} else {
						this.fastlog = false;
						this.$message({
							message: "修改状态成功",
							type: "success"
						});
						that.getFirstData();
					}
				});
			},


			//导出生产跳转页面
			showExportProduct() {
				this.$router.push({
					path: '/order_production/order_export'
				})
				// this.isExportVisible = true;
			},

			//复制功能
			copys: function(t) {
				var that = this
				this.$copyText(t)
					.then(
						res => {
							that.$message.success("复制成功");
						}
					);
			},
			copy() {
				const that = this;
				this.$copyText(this.fuzhi).then(
					res => {
						that.$message.success("复制成功");
					},
					err => {
						that.$message.error("复制失败");
					}
				);
			},

			//分页
			handleCurrentChange(val) {
				this.loading = true
				this.page = val;

				if (this.act == 3) {
					this.zidongshengchanshibai()
				} else {
					this.getFirstData();
				}
			},

			fixpro: function(id) {
				this.productDataVisible = true;
				this.fixid = id
				axios
					.get("/api/plan-market/order/production?one=1&order_id=" + id)
					.then(response => {
						console.log(response);
						this.chooseorderlist = response.data.data;
						if (this.chooseorderlist.tracking_company_id == 1000) {
							this.chooseorderlist.tracking_company_id = String(this.chooseorderlist.tracking_company_id)
							this.wuliu0 = true
						} else {
							this.wuliu0 = false
							this.chooseorderlist.tracking_company_id = String(this.chooseorderlist.tracking_company_id)
						}
						this.fixchooselist = response.data.data;
					});
			},
			backorder: function(id) {
				this.statusVisible = true;
				this.fixid = id
				axios
					.get("/api/plan-market/order/production?one=1&order_id=" + id)
					.then(response => {
						console.log(response);
						this.chooseorderlist = response.data.data;
						if (this.chooseorderlist.tracking_company_id == 1000) {
							this.chooseorderlist.tracking_company_id = ''
						} else {
							this.chooseorderlist.tracking_company_id = String(this.chooseorderlist.tracking_company_id)
						}

						this.fixchooselist = response.data.data;

					});
			},
			//修改订单信息
			fixorder: function(id, source_id) {
				//查看是否是拆单的
				this.amountchai = source_id

				this.handssq = false
				this.informationVisible = true;
				this.fixid = id
				axios.get("/api/plan-market/order/production?one=1&order_id=" + id)
					.then(response => {
						console.log(response);
						this.chooseorderlist = response.data.data;
						if (this.chooseorderlist.tracking_company_id == 1000) {
							this.chooseorderlist.tracking_company_id = ''
						} else {
							this.chooseorderlist.tracking_company_id = String(this.chooseorderlist.tracking_company_id)
						}

						this.fixchooselist = response.data.data;
						//用于看哪个修改了
						this.fixchooselist2 = response.data.data;

						this.address_city = this.fixchooselist.address_city;
						this.address_province = this.fixchooselist.address_province;
						this.address_district = this.fixchooselist.address_district;
						var city = [];
						try {
							if (this.address_province != "") {
								city.push(TextToCode[this.address_province].code)
							}
							if (this.address_city != "") {
								city.push(TextToCode[this.address_province][this.address_city].code)
							}
							if (this.address_district != "") {
								city.push(TextToCode[this.address_province][this.address_city][this.address_district].code)
							}
							this.city = city
						} catch (err) {
							console.log("地址对应不起来")
							if (this.address_province != "") {
								this.handsheng = this.address_province
							}
							if (this.address_city != "") {
								this.handshi = this.address_city
							}
							if (this.address_district != "") {
								this.handqu = this.address_district
							}
							this.handssq = true
						}

						this.selectedOptions = city;

						this.address_name = this.fixchooselist.address_name;
						this.id_card_name = this.fixchooselist.id_card_name;
						this.id_card_num = this.fixchooselist.id_card_num;
						this.address_mobile = this.fixchooselist.address_mobile;
						this.address = this.fixchooselist.address;



					});
			},
			fast: function(id, source_id) {
				//查看是否是拆单的
				this.amountchai = source_id

				this.fastlog = true;
				this.fixid = id
				axios
					.get("/api/plan-market/order/production?one=1&order_id=" + id)
					.then(response => {
						console.log(response);
						this.chooseorderlist = response.data.data;
						if (this.chooseorderlist.tracking_company_id == 1000) {
							this.chooseorderlist.tracking_company_id = ''
						} else {
							this.chooseorderlist.tracking_company_id = String(this.chooseorderlist.tracking_company_id)
						}
						this.fixchooselist = response.data.data;
					});
			},


			choosefixid: function(row) {
				console.log(row);
				this.fixid = row.id;
				this.currentItem = row;
				console.log(this.fixid);
			},
			//取消订单
			backorderok: function() {
				var that = this;
				var params = new URLSearchParams();
				params.append("id", this.fixid);
				axios.post("/api/plan-market/order/cancel", params).then(response => {
					if (response.data.msg.code != 0) {
						this.$message.error(response.data.msg.info);
					} else {
						this.backorderlog = false;
						this.$message({
							message: "修改状态成功",
							type: "success"
						});
						that.getFirstData();
					}
				});
			},
			//下面使用的格式化时间
			formatDate: function(numb) {
				const time = new Date((numb - 1) * 24 * 3600000 + 1)
				time.setYear(time.getFullYear() - 70)
				const year = time.getFullYear() + ''
				const month = time.getMonth() + ''
				let date = time.getDate() + ''
				if (time.getFullYear() % 4 === 0) {
					var X = moment([year, month, date]).subtract(1, 'days').format('YYYY-MM-DD');
				} else {
					var X = moment([year, month, date]).format('YYYY-MM-DD');
				}
				return X
			},
			
			//批量导入生产数据
			exportData(data) {

				var that = this;
				var list = []
				
				//导入提交上游订单ID数据
				if (data.header[0] == "提交上游订单ID") {
					for (var i = 0; i < data.results.length; i++) {
						list.push(data.results[i]['提交上游订单ID'])
					}
					this.daorulog = true
					this.daoruing = true
					axios.post("/api/plan-market/message/order/retry/export", {
							order_ids: list
						})
						.then(function(response) {
							if (response.data.msg.code == 0) {
								// that.daoruok = response.data.data.success
								that.daorulist = response.data.data.split(',')
								for(let i in that.daorulist){
									that.daorulist[i] = '订单ID'+that.daorulist[i]+'失败'
								}
								that.daoruing = false
								that.getFirstData();
							} else {
								that.$message.error(response.data.msg.info);
							}
						})
				
				}
				
				//导入的导入修改数据
				if (data.header[2] == "iccid") {
					console.log(data)
					for (var i = 0; i < data.results.length; i++) {
						var obj = {}
						obj['id'] = data.results[i]['订单id']
						obj['plan_mobile_produced'] = data.results[i]['生产号码']
						obj['iccid'] = data.results[i]['iccid']
						list.push(obj)
					}
					this.daorulog = true
					this.daoruing = true
					axios.post("/api/plan-market/order/import-mobile", {
							data: list
						})
						.then(function(response) {
							if (response.data.msg.code == 0) {
								that.daoruok = response.data.data.success
								that.daorulist = response.data.data.errors
								that.daoruing = false
								that.getFirstData();
							} else {
								that.$message.error(response.data.msg.info);
							}
						})

				}

				//导入的导入修改数据
				if (data.header[0] == "*外部订单号") {
					console.log(data)
					for (var i = 0; i < data.results.length; i++) {
						var obj = {}
						obj['source_id'] = data.results[i]['*外部订单号']
						obj['memo'] = data.results[i]['自动备注信息']
						obj['track_company'] = data.results[i]['*物流公司']
						obj['track_number'] = data.results[i]['*运单号']
						obj['flag'] = data.results[i]['标旗（仅京东天猫）']
						list.push(obj)
					}
					this.daorulog = true
					this.daoruing = true
					axios.post("/api/plan-market/shuadan/imp", {
							data: list
						})
						.then(function(response) {
							if (response.data.msg.code == 0) {
								if (response.data.data == 'success') {
									that.daoruok = '全部成功'
								} else {
									that.daorulist = response.data.data
								}

								that.daoruing = false
								that.getFirstData();
							} else {
								that.$message.error(response.data.msg.info);
							}
						})

				}



				//导入的是激活状态的情况
				if (data.header[0] == "*生产号码") {
					for (var i = 0; i < data.results.length; i++) {
						var obj = {}
						obj['plan_mobile_produced'] = data.results[i]['*生产号码']
						obj['remark'] = data.results[i]['*激活状态']
						data.results[i]['激活时间'] = that.formatDate(parseInt(data.results[i]['激活时间']))
						data.results[i]['首充时间'] = that.formatDate(parseInt(data.results[i]['首充时间']))
						obj['active_at'] = data.results[i]['激活时间']
						obj['recharge_at'] = data.results[i]['首充时间']
						list.push(obj)
					}
					this.daorulog = true
					this.daoruing = true
					axios.post("/api/plan-market/orders/active", {
							data: list
						})
						.then(function(response) {
							const status = response.status;
							const data = response.data;
							const msg = data.msg;
							const code = msg.code;
							if (status === 200 && code === 0) {
								that.daoruok = data.data.success
								that.daorulist = data.data.errors
								that.daoruing = false
								that.getFirstData();
							} else {
								if (status !== 200) {
									that.percentage = 100;
									that.progressVisible = false;
									that.$message.error("网络异常");
								} else {
									that.percentage = 100;
									that.progressVisible = false;
									that.$message.error(msg.info);
								}
							}
						})
						.catch(function(err) {
							that.$message.error("异常:" + err.message);
						});
				}
				if (data.header[0] == "订单ID") {

					//导入的是生产发货
					for (var i = 0; i < data.results.length; i++) {
						var obj = {}
						obj['id'] = data.results[i]['订单ID']
						obj['plan_mobile_produced'] = data.results[i]['生产号码']
						obj['the_number'] = data.results[i]['按号码发货']
						obj['tracking_company'] = data.results[i]['物流公司']
						obj['tracking_number'] = data.results[i]['运单号']
						obj['produce_fail'] = data.results[i]['生产失败原因']
						obj['picture_fail'] = data.results[i]['照片审核失败原因']
						obj['source_id'] = data.results[i]['外部订单号']
						obj['id_num'] = data.results[i]['身份证号']
						obj['iccid'] = data.results[i]['iccid']

						if (obj['id'] != undefined) {
							obj['id'] = obj['id'].toString();
							obj['id'] = obj['id'].replace(/(^\s*)|(\s*$)/g, "");
						}

						if (obj['plan_mobile_produced'] != undefined) {
							obj['plan_mobile_produced'] = obj['plan_mobile_produced'].toString();
							obj['plan_mobile_produced'] = obj['plan_mobile_produced'].replace(/(^\s*)|(\s*$)/g, "");
						}
						if (obj['the_number'] != undefined) {
							obj['the_number'] = obj['the_number'].toString();
							obj['the_number'] = obj['the_number'].replace(/(^\s*)|(\s*$)/g, "");
						}
						if (obj['tracking_company'] != undefined) {
							obj['tracking_company'] = obj['tracking_company'].toString();
							obj['tracking_company'] = obj['tracking_company'].replace(/(^\s*)|(\s*$)/g, "");
						}
						if (obj['tracking_number'] != undefined) {
							obj['tracking_number'] = obj['tracking_number'].toString();
							obj['tracking_number'] = obj['tracking_number'].replace(/(^\s*)|(\s*$)/g, "");
						}
						if (obj['produce_fail'] != undefined) {
							obj['produce_fail'] = obj['produce_fail'].toString();
							obj['produce_fail'] = obj['produce_fail'].replace(/(^\s*)|(\s*$)/g, "");
						}
						if (obj['picture_fail'] != undefined) {
							obj['picture_fail'] = obj['picture_fail'].toString();
							obj['picture_fail'] = obj['picture_fail'].replace(/(^\s*)|(\s*$)/g, "");
						}
						if (obj['source_id'] != undefined) {
							obj['source_id'] = obj['source_id'].toString();
							obj['source_id'] = obj['source_id'].replace(/(^\s*)|(\s*$)/g, "");
						}
						if (obj['id_num'] != undefined) {
							obj['id_num'] = obj['id_num'].toString();
							obj['id_num'] = obj['id_num'].replace(/(^\s*)|(\s*$)/g, "");
						}
						if (obj['tracking_number'] != "" && obj['tracking_number'] != undefined) {
							if (obj['tracking_company'] == "" || obj['tracking_company'] == undefined) {
								that.$message.error("物流公司不能为空，请仔细检查表格");
								return false
							}
						}
						if (obj['tracking_company'] != "" && obj['tracking_company'] != undefined) {
							if (obj['tracking_number'] == "" || obj['tracking_number'] == undefined) {
								that.$message.error("物流公司不能为空，请仔细检查表格");
								return false
							}
						}
						list.push(obj)
					}
					this.daorulog = true
					this.daoruing = true
					axios.post("/api/plan-market/order/produced", {
							data: list
						})
						.then(function(response) {
							const status = response.status;
							const data = response.data;
							const msg = data.msg;
							const code = msg.code;
							if (status === 200 && code === 0) {
								that.daoruok = data.data.success
								that.daorulist = data.data.error
								that.daoruing = false
								that.getFirstData();
							} else {
								if (status !== 200) {
									that.percentage = 100;
									that.progressVisible = false;
									that.$message.error("网络异常");
								} else {
									that.percentage = 100;
									that.progressVisible = false;
									that.$message.error(msg.info);
								}
							}
						})
						.catch(function(err) {
							that.$message.error("异常:" + err.message);
						});
				}


			},


			//修改地址
			handleChange(value) {
				console.log(value);
				this.address_province_code = value[0];
				this.address_city_code = value[1];
				this.address_district_code = value[2];

				this.address_province = CodeToText[value[0]];
				this.address_city = CodeToText[value[1]];
				this.address_district = CodeToText[value[2]];
				console.log(this.address_province);
			},
			//修改状态
			updateStatus() {
				const that = this;
				var data3 = {
					id: this.fixid,
					status: this.updatedS,
					remark: this.remarks
				};
				if (
					(this.updatedS == "-460" ||
						this.updatedS == "-200" ||
						this.updatedS == "0") &&
					this.remarks == ""
				) {
					that.$message.error("请填写备注");
					return;
				}
				axios
					.post("/api/plan-market/order/status/update", data3)
					.then(function(response) {
						console.log(response);
						const status = response.status;
						const data = response.data;
						const msg = data.msg;
						console.log(response);
						if (status === 200 && msg.code === 0) {
							that.$message({
								message: "操作成功",
								type: "success"
							});
							if (that.isShowNormal) {
								that.getFirstData();
							} else {
								that.getUrgentOrder();
							}
						} else {
							if (status !== 200) {
								that.$message.error("网络异常");
							} else {
								that.$message.error(msg.info);
							}
						}
					})
					.catch(function(err) {
						that.$message.error("异常:" + err.message);
					});
				this.statusVisible = false;
				this.remarks = "";
				this.updatedS = "";
			},

			//修改信息
			updateInformation() {
				const that = this;
				var data2 = {}
				data2['id'] = this.fixid
				console.log(this.fixchooselist2.address_name)
				console.log(this.address_name)
				if (this.tongbu == true) {
					data2['same'] = 1
				}
				if (this.tongbu == false) {
					data2['same'] = 0
				}
				if (this.fixchooselist2.address_name != this.address_name) {
					data2['address_name'] = this.address_name
				}
				if (this.fixchooselist2.id_card_name != this.id_card_name) {
					data2['id_card_name'] = this.id_card_name
				}
				if (this.fixchooselist2.id_card_num != this.id_card_num) {
					data2['id_card_num'] = this.id_card_num
				}
				if (this.fixchooselist2.address_mobile != this.address_mobile) {
					data2['address_mobile'] = this.address_mobile
				}
				if (this.fixchooselist2.address_province != this.address_province) {
					data2['address_province'] = this.address_province
				}
				if (this.fixchooselist2.address_city != this.address_city) {
					data2['address_city'] = this.address_city
				}
				if (this.fixchooselist2.address != this.address) {
					data2['address'] = this.address
				}
				if (this.fixchooselist2.address_district != this.address_district) {
					data2['address_district'] = this.address_district
				}

				if (this.fixchooselist2.address_province_code != this.address_province_code) {
					data2['address_province_code'] = this.address_province_code
				}
				if (this.fixchooselist2.address_city_code != this.address_city_code) {
					data2['address_city_code'] = this.address_city_code
				}
				if (this.fixchooselist2.address_district_code != this.address_district_code) {
					data2['address_district_code'] = this.address_district_code
				}

				if (this.handsheng != '') {
					data2['address_province'] = this.handsheng
				}
				if (this.handshi != '') {
					data2['address_city'] = this.handshi
				}
				if (this.handqu != '') {
					data2['address_district'] = this.handqu
				}

				axios.post("/api/plan-market/order/info/update", data2)
					.then(function(response) {
						console.log(response);
						const status = response.status;
						const data = response.data;
						const msg = data.msg;
						console.log(response);
						if (status === 200 && msg.code === 0) {
							that.$message({
								message: "操作成功",
								type: "success"
							});
							if (that.isShowNormal) {
								that.getFirstData();
							} else {
								that.getUrgentOrder();
							}
						} else {
							if (status !== 200) {
								that.$message.error("网络异常");
							} else {
								that.$message.error(msg.info);
							}
						}
					})
					.catch(function(err) {
						that.$message.error("异常:" + err.message);
					});
				this.address_name = "";
				this.id_card_name = "";
				this.id_card_num = "";
				this.address_mobile = "";
				this.address_province = "";
				this.address_city = "";
				this.address_district = "";
				this.address = "";
				this.informationVisible = false;
			},
			//生产失败
			productFailButton() {
				const that = this;
				if (this.remark_reason == "") {
					this.$message.error("请输入失败原因");
					return;
				}
				var data1 = {
					id: this.currentId,
					remark: this.remark_reason
				};
				axios
					.post("/api/plan-market/order/produce_file", data1)
					.then(function(response) {
						console.log(response);
						const status = response.status;
						const data = response.data;
						const msg = data.msg;
						console.log(response);
						if (status === 200 && msg.code === 0) {
							that.$message({
								message: "操作成功",
								type: "success"
							});
							if (that.isShowNormal) {
								that.getFirstData();
							} else {
								that.getUrgentOrder();
							}
						} else {
							if (status !== 200) {
								that.$message.error("网络异常");
							} else {
								that.$message.error(msg.info);
							}
						}
					})
					.catch(function(err) {
						that.$message.error("异常:" + err.message);
					});
				this.remark_reason = "";
				this.productFailVisible = false;
			},
			//下载修改导入数据
			downDate3: function() {
				const a = document.createElement('a');
				a.setAttribute('download', '修改导入数据模板.xlsx');
				a.setAttribute('href', this.url + 'static/fixiccid.xlsx');
				a.click();
			},
			//下载激活状态模板
			downDate2: function() {
				const a = document.createElement('a');
				a.setAttribute('download', '导入激活状态模板.xlsx');
				a.setAttribute('href', this.url + 'static/remarkstatus.xlsx');
				a.click();
			},
			downshuadan2:function(){
				const a = document.createElement('a');
				a.setAttribute('download', '刷单订单处理.xlsx');
				a.setAttribute('href', this.url + 'static/moban/chongtishangyou.xlsx');
				a.click();
			},
			downshuadan: function() {
				const a = document.createElement('a');
				a.setAttribute('download', '重提上游模板.xlsx');
				a.setAttribute('href', this.url + 'static/shuadan.xlsx');
				a.click();
			},
			//下载
			downDate: function() {
				const a = document.createElement('a');
				a.setAttribute('download', '导入生产模板.xlsx');
				a.setAttribute('href', this.url + 'static/shengchan.xlsx');
				a.click();
			},
			//导出信息
			exportInformation() {
				console.log('https://' + window.location.origin)
				this.daochuing = true
				this.daochuingz = "导出中..."
				if (this.productQuery) {
					this.search.product_id = this.productQuery.join(",");
				}
				this.type = 3;

				this.search.source = this.search.source.trim()
				this.search.good_sku = this.search.good_sku.trim()
				this.search.card_num = this.search.card_num.trim()
				this.search.tracking_number = this.search.tracking_number.trim()
				this.search.order_id = this.search.order_id.trim()

				this.search.source_id = this.search.source_id.trim()
				this.search.channel_id = this.search.channel_id.trim()
				this.search.merchant_name = this.search.merchant_name.trim()

				// var url = window.location.origin +"/api/plan-market/order/export?type=3&status=" +this.search.status + "&product_ids=" +this.search.product_id +
				// "&source=" + this.search.source + "&color=" + this.search.flag +
				// "&card_num=" + this.search.card_num +  "&sp_sku=" + this.search.good_sku +
				// "&tracking_number=" + this.search.tracking_number +  "&order_id=" + this.search.order_id +
				// "&amount=" + this.amount +  "&source_id=" + this.search.source_id +
				// "&start=" + this.search.start + "&end=" + this.search.end +
				// "&activated_at_start=" + this.search.activated_at_start + "&activated_at_end=" + this.search.activated_at_end +
				// "&status_at_start=" +this.search.status_at_start + "&status_at_end=" +this.search.status_at_end +
				// "&channel_id=" + this.search.channel_id +  "&merchant_name=" + this.search.merchant_name +
				// "&order_by=0" + "&page=" + this.page + "&number=" + this.search.plan_mobile_produced +
				// "&page_size=" + this.size + "&flag="+this.flag + "&iccid="+this.search.iccid + "&address="+this.search.address + "&active_status="+this.search.jihuo +
				// "&deliver_status="+this.search.fahuo + "&address_mobile="+this.search.mobile
				var data = {}
				data['password'] = this.mima
				data['type'] = 3
				data['status'] = this.search.status
				data['product_ids'] = this.search.product_id
				data['source'] = this.search.source
				data['color'] = this.search.flag
				data['card_num'] = this.search.card_num
				data['sp_sku'] = this.search.good_sku
				data['tracking_number'] = this.search.tracking_number
				data['order_id'] = this.search.order_id
				data['amount'] = this.amount
				data['source_id'] = this.search.source_id
				data['start'] = this.search.start
				data['end'] = this.search.end
				data['activated_at_start'] = this.search.status_at_start
				data['activated_at_end'] = this.search.activated_at_end
				data['channel_id'] = this.search.channel_id
				data['merchant_name'] = this.search.merchant_name
				data['order_by'] = 0
				data['number'] = this.search.plan_mobile_produced
				data['flag'] = this.flag
				data['iccid'] = this.search.iccid
				data['address'] = this.search.address
				data['active_status'] = this.search.jihuo
				data['deliver_status'] = this.search.fahuo
				data['address_mobile'] = this.search.mobile

				axios.post('/api/plan-market/order/export', data).then(response => {
					if (response.data.msg.code == 0) {
						localStorage.setItem("daochumima",this.mima)
						// var a = document.createElement('a');
						// a.setAttribute('href', response.data.data);
						// a.click();
						this.daochuing = false
						this.daochuingz = "导出信息"
						// this.mimalog = false
						//2021.3.1全部导出修改
						// this.$router.push({
						//   path:'/order_export2'
						// })
						let routeData = this.$router.resolve({
							path: '/order_export2'
						});
						window.open(routeData.href, '_blank');
					} else {
						this.$message.error(response.data.msg.info);
						this.daochuing = false
						this.daochuingz = "导出信息"
					}

				})
			},
			//查找兄弟
			searchbrother: function(real_source_id) {

				this.danxuans = []
				this.quanxuana = false
				if (this.productQuery) {
					this.search.product_id = this.productQuery.join(",");
				}
				const that = this;
				if (this.act == 3) {
					this.amount = 2
				} else {
					this.amount = 0
				}

				this.search.source = this.search.source.trim()
				this.search.good_sku = this.search.good_sku.trim()
				this.search.card_num = this.search.card_num.trim()
				this.search.tracking_number = this.search.tracking_number.trim()
				this.search.order_id = this.search.order_id.trim()

				this.search.source_id = this.search.source_id.trim()
				this.search.channel_id = this.search.channel_id.trim()
				this.search.merchant_name = this.search.merchant_name.trim()
				this.search.plan_mobile_produced = this.search.plan_mobile_produced.trim()

				axios.get("/api/gth/orders/splited?real_source_id=" + real_source_id)
					.then(function(response) {
						console.log(response.data.data);
						const status = response.status;
						const data = response.data;
						const msg = data.msg;
						that.total = data.data.total;
						that.num = data.data.num;
						that.morennum = data.data.morenum;
						if (status === 200 && msg.code === 0) {
							that.productDetail = data.data.data;
							for (var i = 0; i < data.data.data.length; i++) {
								if (data.data.data[i].flag == 0) {
									data.data.data[i].flag = "#e4dfd7"
								}
								if (data.data.data[i].flag == 1) {
									data.data.data[i].flag = "#ee3f4d"
								}
								if (data.data.data[i].flag == 2) {
									data.data.data[i].flag = "#ebb10d"
								}
								if (data.data.data[i].flag == 3) {
									data.data.data[i].flag = "#229453"
								}
								if (data.data.data[i].flag == 4) {
									data.data.data[i].flag = "#2775b6"
								}
								if (data.data.data[i].flag == 5) {
									data.data.data[i].flag = "#8076a3"
								}
								that.productDetail[i].address =
									data.data.data[i].address_province +
									data.data.data[i].address_city +
									data.data.data[i].address_district +
									data.data.data[i].address;
							}
							that.loading = false;
							that.ids()
						} else {
							if (status !== 200) {
								that.$message.error("网络异常");
							} else {
								that.$message.error(msg.info);
							}
						}
					})
					.catch(function(err) {
						that.$message.error("异常:" + err.message);
					});

			},
			//搜索条件筛选
			dosearch() {
				if (this.act == 3) {
					this.act = 1
				}

				this.page = 1
				this.loading = true
				this.getFirstData();
			},


			Product() {
				this.remark_reason = "";
				this.productFailVisible = false;
			},
			selectTags(item) {
				this.remark_reason = item.label;
			},
			//产品录入确认
			addproductData() {
				const that = this;
				var data = {
					id: this.fixid,
					tracking_company_id: Number(this.chooseorderlist.tracking_company_id),
					plan_mobile_produced: this.chooseorderlist.plan_mobile_produced,
					tracking_number: this.chooseorderlist.tracking_number
				};
				axios
					.post("/api/plan-market/order/update_produce_data", data)
					.then(function(response) {
						console.log(response);
						const status = response.status;
						const data = response.data;
						const msg = data.msg;
						console.log(response);
						if (status === 200 && msg.code === 0) {
							that.$message({
								message: "操作成功",
								type: "success"
							});
							if (that.isShowNormal) {
								that.getFirstData();
							} else {
								that.getUrgentOrder();
							}
						} else {
							if (status !== 200) {
								that.$message.error("网络异常");
							} else {
								that.$message.error(msg.info);
							}
						}
					})
					.catch(function(err) {
						that.$message.error("异常:" + err.message);
					});
				this.productDataVisible = false;
				this.product_number = "";
				this.Tracking_number = "";
			},
			//上产失败
			productFail(id) {
				this.currentId = id;
				this.productFailVisible = true;
			},
			//查看详情
			seedetail: function(id) {
				window.open(window.location.origin + "/#/order_production/productDetail?id=" + id)
			},
			//显示加急订单
			getUrgentOrder() {
				this.act = 2
				this.loading = true
				this.flag = 1
				this.getFirstData()
			},

			//显示自动生产失败的订单
			getUrgentOrder2() {
				this.act = 3
				this.loading = true
				this.page = 1
				this.zidongshengchanshibai()

			},
			zidongshengchanshibai: function() {
				var that = this
				//获取自动生产失败的订单列表
				axios.get("/api/plan-market/message/order/list?page=" + this.page + '&page_size=20')
					.then(function(response) {
						console.log(response.data.data);
						const status = response.status;
						const data = response.data;
						const msg = data.msg;
						that.total = data.data.total;
						if (status === 200 && msg.code === 0) {
							that.productDetail = data.data.data;
							for (var i = 0; i < data.data.data.length; i++) {
								if (data.data.data[i].flag == 0) {
									data.data.data[i].flag = "#e4dfd7"
								}
								if (data.data.data[i].flag == 1) {
									data.data.data[i].flag = "#ee3f4d"
								}
								if (data.data.data[i].flag == 2) {
									data.data.data[i].flag = "#ebb10d"
								}
								if (data.data.data[i].flag == 3) {
									data.data.data[i].flag = "#229453"
								}
								if (data.data.data[i].flag == 4) {
									data.data.data[i].flag = "#2775b6"
								}
								if (data.data.data[i].flag == 5) {
									data.data.data[i].flag = "#8076a3"
								}
								that.productDetail[i].address =
									data.data.data[i].address_province +
									data.data.data[i].address_city +
									data.data.data[i].address_district +
									data.data.data[i].address;
							}
							that.loading = false;
							that.num2 = data.data.total
							that.ids()
						} else {
							if (status !== 200) {
								that.$message.error("网络异常");
							} else {
								that.$message.error(msg.info);
							}
						}
					})
					.catch(function(err) {
						that.$message.error("异常:" + err.message);
					});
			},
			zidongshengchanshibai2: function() {
				var that = this
				//获取自动生产失败的订单列表
				axios.get("/api/plan-market/message/order/list")
					.then(function(response) {
						console.log(response.data.data);
						const status = response.status;
						const data = response.data;
						const msg = data.msg;
						that.total = data.data.total;
						if (status === 200 && msg.code === 0) {
							that.num2 = data.data.total
						}
					})
					.catch(function(err) {
						that.$message.error("异常:" + err.message);
					});
			},
			chongxintijiao: function(id) {
				var that = this
				axios.post("/api/plan-market/message/order/retry", {
						id: id
					})
					.then(function(response) {
						if (response.data.msg.code == 0) {
							that.zidongshengchanshibai()
							that.$message("提交成功");
						} else {
							that.$message.error(response.data.msg.info);
						}
					})
			},

			//获取生产数据
			getFirstData() {
				this.danxuans = []
				this.quanxuana = false
				if (this.productQuery) {
					this.search.product_id = this.productQuery.join(",");
				}
				const that = this;
				if (this.act == 3) {
					this.amount = 2
				} else {
					this.amount = 0
				}

				this.search.source = this.search.source.trim()
				this.search.good_sku = this.search.good_sku.trim()
				this.search.card_num = this.search.card_num.trim()
				this.search.tracking_number = this.search.tracking_number.trim()
				this.search.order_id = this.search.order_id.trim()

				this.search.source_id = this.search.source_id.trim()
				this.search.channel_id = this.search.channel_id.trim()
				this.search.merchant_name = this.search.merchant_name.trim()
				this.search.plan_mobile_produced = this.search.plan_mobile_produced.trim()

				axios.get("/api/plan-market/order/production?type=3&product_ids=" + this.search.product_id +
						"&source=" + this.search.source + "&color=" + this.search.flag +
						"&card_num=" + this.search.card_num + "&sp_sku=" + this.search.good_sku +
						"&tracking_number=" + this.search.tracking_number + "&order_id=" + this.search.order_id +
						"&amount=" + this.amount + "&source_id=" + this.search.source_id + "&number=" + this.search.plan_mobile_produced +
						"&status=" + this.search.status + "&flag=" + this.flag +
						"&start=" + this.search.start + "&end=" + this.search.end +
						"&activated_at_start=" + this.search.activated_at_start + "&activated_at_end=" + this.search.activated_at_end +
						"&status_at_start=" + this.search.status_at_start + "&status_at_end=" + this.search.status_at_end +
						"&channel_id=" + this.search.channel_id + "&merchant_name=" + this.search.merchant_name +
						"&order_by=0" + "&page=" + this.page + "&page_size=" + this.size + "&iccid=" + this.search.iccid + "&address=" +
						this.search.address + "&active_status=" + this.search.jihuo +
						"&deliver_status=" + this.search.fahuo + "&address_mobile=" + this.search.mobile
					)
					.then(function(response) {
						if(response.data.msg.code == 0){
							const status = response.status;
							const data = response.data;
							const msg = data.msg;
							that.total = data.data.total;
							that.num = data.data.num;
							that.morennum = data.data.morenum;
							that.productDetail = data.data.data;
							for (var i = 0; i < data.data.data.length; i++) {
								if (data.data.data[i].flag == 0) {
									data.data.data[i].flag = "#e4dfd7"
								}
								if (data.data.data[i].flag == 1) {
									data.data.data[i].flag = "#ee3f4d"
								}
								if (data.data.data[i].flag == 2) {
									data.data.data[i].flag = "#ebb10d"
								}
								if (data.data.data[i].flag == 3) {
									data.data.data[i].flag = "#229453"
								}
								if (data.data.data[i].flag == 4) {
									data.data.data[i].flag = "#2775b6"
								}
								if (data.data.data[i].flag == 5) {
									data.data.data[i].flag = "#8076a3"
								}
								that.productDetail[i].address =
									data.data.data[i].address_province +
									data.data.data[i].address_city +
									data.data.data[i].address_district +
									data.data.data[i].address;
							}
							
							that.ids()
						}else{
							const status = response.status;
							const data = response.data;
							const msg = data.msg;
							that.$message.error(msg.info);
						}
						
						that.loading = false;
					})
					
			},
		}
	};
</script>
<style lang="scss" scoped>
	.order_production {
		margin: 0;
		padding: 0;
		margin: 0;
		padding: 0;
		background: #EFEFEF;

		.ssq {
			.el-input {
				width: 110px
			}
		}

		.handgo {
			color: #197cff;
		}

		.logflex {
			display: flex;
			justify-content: space-around;
		}

		.logflex div {
			width: 377px;
			text-align: center;
		}

		.logflex .proimg {
			display: flex;
			justify-content: center;
			align-items: center;
			height: 265px;
			background: #EAEAEA;
		}

		.logflex .proimg img {
			max-width: 100%;
			max-height: 100%;
		}

		.center {
			width: 1366px;
			margin: 0 auto;
			display: flex;
			justify-content: space-between;

			.doit {
				background: #EFEFEF;
				padding-bottom: 20px;

				.doith {
					line-height: 45px;
					background: #F5F7FA;
					padding-left: 20px;
				}

				.doitd {
					display: flex;
					padding: 20px;
					border: 1px #EAEAEA solid;
					background: #ffffff;
				}
			}

			.newflex {
				display: flex;
				justify-content: space-between;

				.newflex2 {
					display: flex;

					span {
						flex: 1;
					}
				}
			}

			.newsearch {
				display: flex;
				text-align: center;
				margin-bottom: 10px;
				font-size: 14px;
				border-bottom: 3px #dcdcdc solid;

				.shuxian {
					img {
						height: 20px;
						position: relative;
						top: 14px
					}
				}

				.act {
					color: #EEF7FF;
					border-bottom: 3px #EEF7FF solid !important;
				}

				.news1 {
					padding: 10px 20px;
					cursor: pointer;
					position: relative;
					top: 3px;
				}

				.news2 {
					padding: 10px 0;
					cursor: pointer;
				}

				.news3 {
					padding: 10px 0;
					cursor: pointer;
				}

				.news4 {
					padding: 10px 0;
					cursor: pointer;
				}
			}

			.newlistbor {
				border: 1px #DCDCDC solid;
				margin-bottom: -1px;
			}

			.powertable {
				margin: 0 10px;
			}

			.newlist {
				border-bottom: 1px #F6F6F6 solid;
				margin-top: 10px;

				.newleft {
					display: flex;
					flex-basis: 1166px;
				}

				.newthli {
					font-size: 14px;
					line-height: 40px;
					height: 40px;
					background: #F9F9F9;
					color: #646464;
					text-align: center;
				}

				.newthli1 {
					flex-basis: 30px;
				}

				.newthli2 {
					flex-basis: 215px;
				}

				.newthli3 {
					flex-basis: 300px;
				}

				.newthli4 {
					flex-basis: 125px;
				}

				.newthli5 {
					flex-basis: 125px;
				}

				.newthli6 {
					flex-basis: 170px;
				}

				.newthli7 {
					flex-basis: 176px;
				}

				.ml20 {
					margin-left: 20px;
				}

				.newright {
					flex-basis: 116px;
				}

				.newh {
					display: flex;
					justify-content: space-between;
					background: #F3FAFF;
					line-height: 48px;
					height: 48px;
					color: #646464;
					font-size: 13px;
					padding-left: 25px;

					.newhli {
						margin-right: 15px;

						.el-icon-document-copy {
							margin-left: 0 !important;
						}
					}
				}

				.newb {
					display: flex;
					font-size: 14px;
					color: #646464;
					line-height: 25px;

					.newt1 {
						flex-basis: 245px;
						padding-left: 25px;
						box-sizing: border-box;
						border-right: 1px #EAEAEA solid;
						padding: 15px;
					}

					.newt2 {
						flex-basis: 300px;
						position: relative;
						box-sizing: border-box;
						border-right: 1px #EAEAEA solid;
						padding: 15px;
					}

					.seephoto {
						color: #197cff;
						cursor: pointer
					}

					.newt3 {
						flex-basis: 125px;
						text-align: center;
						box-sizing: border-box;
						border-right: 1px #EAEAEA solid;
						padding: 15px;
					}

					.newt4 {
						flex-basis: 170px;
						text-align: center;
						box-sizing: border-box;
						border-right: 1px #EAEAEA solid;
						padding: 15px;
					}

					.newt5 {
						flex-basis: 177px;
						text-align: center;
						line-height: 15px;
						color: #2775b6;
						box-sizing: border-box;
						border-right: 1px #EAEAEA solid;
						padding: 15px;

						div {
							cursor: pointer;
							margin-bottom: 5px;
							color: #197cff;
						}
					}

				}

			}

			.right {
				flex-basis: 1166px;
				background: #fff;

				.title {
					line-height: 45px;
					padding-left: 30px;
					font-size: 16px;
					background: #f9f9f9;
					color: #727272;
				}

				.add {
					padding: 20px 30px;
				}

				.list {
					display: flex;
					text-align: center;
					color: #727272;
					line-height: 45px;
					margin: 0 20px;
					border: 1px #eaeaea solid;
					margin-top: -1px;

					.th {
						flex: 1;
						background: #f9f9f9;
						font-size: 14px;
						border-right: 1px #eaeaea solid;
					}

					.td {
						flex: 1;
						font-size: 14px;
						border-right: 1px #eaeaea solid;
					}
				}

				.el-pagination {
					text-align: right;
					margin: 20px 0;
				}
			}
		}

		.result {
			margin-top: 20px;
		}

		.el-table td,
		.el-table th {
			font-size: 14px;
		}

		.el-dropdown-link {
			font-size: 10px;
		}

		.el-color-picker .el-color-picker--medium {
			width: 100%;
		}

		.operating_p {
			color: #2062e6;
		}

		.product_all {
			display: inline-block;
			width: 30%;
			border: 1px solid rgba(229, 229, 229, 1);
			height: 300px;
			overflow: auto;
		}

		#drop .el-button--primary {
			margin-left: 10px;
			background-color: #EEF7FF;
			border: 1px #EEF7FF solid;
			padding: 8px 20px !important;
		}

		.product_select {
			display: inline-block;
			width: 45%;
			border: 1px solid rgba(229, 229, 229, 1);
			height: 300px;
		}

		.ordersearch {
			background: #ffffff;
			margin: 10px 0;
			padding: 15px 30px;
		}

		.item {
			margin-top: 10px;
			margin-right: 10px;
		}

		.orderflex input {}

		.orderflex {
			display: flex;

			.el-form-item {
				margin-bottom: 20px;
			}

			.el-form-item__label {
				font-size: 14px;
				line-height: 32px !important;
				height: 32px !important;
			}

			.el-input {
				line-height: 32px;
				width: 170px;
			}

			.el-form-item__content {
				line-height: 32px !important;
				height: 32px !important;
			}

			.el-input__inner {
				line-height: 32px !important;
				height: 32px !important;
			}

			.el-input__icon {
				line-height: 32px !important;
				height: 32px !important;
			}
		}
		.el-tabs--border-card>.el-tabs__header .el-tabs__item{
			border-top: 5px solid #F5F7FA;
			color: #727272;

			height: 100%;
			width: 170px;
			text-align: center;
		}
		.el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active {
			border-top: 5px solid #DD2727;
			color: #727272;
			background-color: #ffffff;
			height: 100%;
			width: 170px;
			text-align: center;
		}

		.el-tabs--border-card>.el-tabs__header {
			background-color: #F5F7FA;
			font-weight: 400;
			border: 0;
		}

		/* .el-button--primary {
  background-color: #df3434;
} */
		.head {
			width: 317px;
			height: 61px;
			line-height: 61px;
		}

		.el-tabs--border-card>.el-tabs__header .el-tabs__item {
			color: #4d4d4d;
		}

		.el-tabs--border-card>.el-tabs__header .el-tabs__item:hover {
			color: #df3434;
		}

		.el-tabs--border-card>.el-tabs__content {
			padding: 0;
		}

		.operating_p {
			font-size: 10px;
			color: #2062e6;
		}

		.operating_p:hover {
			color: #df3434;
			cursor: pointer;
		}

		.finance_list {
			overflow: hidden;
		}

		.jianqie {
			width: 100%;
			height: 730px;
		}

		.jianqieall {
			margin-bottom: 10px;
			display: flex;
			justify-content: space-between;
		}
	}
</style>
